1. Field of the Invention
The present invention relates to a method for determining a rebooting action of a computer system and a related computer system, and more particularly, to a method for determining a rebooting action of a computer system with a keyboard controller and a related computer system.
2. Description of the Prior Art
In the modern information society nowadays, a computer system has been one of the essential information tools, no matter a desktop personal computer, a notebook, or a server. The operating clock rate of the computer system is getting faster and faster, and the application level prevails more widely and broadly.
According to the conventional specification made by the Advanced Configuration and Power Interface (ACPI), the computer system is sorted into S0, S1, S2, S3, S4, and S5 statuses on a basis of power consumption of the computer system. The S0, S1, S2 statuses are all active statuses but differ from on/off conditions between the operating clock rate of the processor and each component respectively; the S3 status is a standby status, that means the computer system will keep all the information stored in the memory (suspend to RAM, STR); the S4 status is a sleeping status, that means the computer system has to end all the programs in executing and TSR (Terminate and Stay Resident) programs, and stores the system configuration in a hard disk temporarily (suspend to disk, STD); the S5 status is a shutting-down status, that means the computer system will execute a shutting-down procedure.
From a viewpoint of the system, when the computer powers on, a PCIRST signal transmitted from a basic input/output system (BIOS) shifts from a low level to a high level. During the period of power-on self testing (POST), the basic input/output system commands to set a system status flag of a keyboard controller as “ON” (for example “1”) through an I/O port 64h. At this time the system status flag represents the computer system is in the active status. However when the computer system prepares to enter a standby status, a sleeping status, or a shutting-down status, the PCIRST signal will shift from the high level to the low level. At this time the system status flag of the keyboard controller will be set as “OFF” (cleared to 0). When the computer system reboots, the basic input/output system reads the system status flag of the keyboard controller through the I/O port 64h. If the system status flag is 1, the basic input/output system determines that the computer system is in the rebooting status and pushes the PCIRST signal to produce a low pulse in order to inform all the components connected to PCI buses of executing a reset action.
From a viewpoint of the keyboard controller, the keyboard controller can detect an S3 signal (SLP_S3#), an S4 signal (SLP_S4#), or an S5 signal (SLP_S5#) transmitted form the south bridge chipset to determine whether the computer system is in the standby status, the sleeping status, or the shutting-down status. When the S3, S4, S5 signals are all in the high level, it represents the computer system is in the active status. But only seeing through the S3, S4, S5 signals transmitted from the south bridge chipset can't determine whether the computer system is in the rebooting status. This is because when the computer system is in the rebooting status, the S3, S4, S5 signals are still in the high level and unchanged. During the rebooting process of the computer system, the system status flag keeps unchanged until the PCIRST signal shifts from the high level to the low level. Then the system status flag of the keyboard controller will be cleared to 0. This action is the same as the action executed when the computer system is going to enter the standby status, the sleeping status, or the shutting-down status. Therefore these information isn't enough for the keyboard controller to determine whether the computer system should execute the rebooting action. Furthermore many other actions corresponding to the rebooting action can't be executed efficiently, and the rebooting time is too long to lower the system efficiency.